﻿CREATE TABLE [dbo].[Customer] (
    [Id]      INT           IDENTITY (1, 1) NOT NULL,
    [Phone]   INT           NOT NULL,
    [Name]    NVARCHAR (50) NOT NULL,
    [Street]  NVARCHAR (50) NOT NULL,
    [Zip]     NVARCHAR (20) NOT NULL,
    [City]    NVARCHAR (50) NOT NULL,
    [Created] DATETIME      CONSTRAINT [DF_Customer] DEFAULT (getdate()) NOT NULL,
    [Email] NVARCHAR(50) NOT NULL, 
    CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_CustomerPhone]
    ON [dbo].[Customer]([Phone] ASC);

